<template>
  <div class="footer_wrap">
    <div class="footer_content">
      <div class="footer_item">
        <!-- <a class="item on" :class="isOn===true?'on':''" href=""> -->
        <!-- <a class="item" :class="{on:'/msite'===$route.path}" href="javascript:;" @click="goTo('/msite')">
          <i class="iconfont icon-elemo-waimai-canyin"></i>
          <span>外卖</span>
        </a> -->
        <router-link to="/msite" :class="{on:'/msite'===$route.path}">
            <i class="iconfont icon-elemo-waimai-canyin"></i>
          <span>外卖</span>
        </router-link>
      </div>
      <div class="footer_item">
        <!-- <a class="item" :class="isOn===true?'on':''" href=""> -->
        <a class="item" :class="{on:'/search'===$route.path}" href="javascript:;" @click="goTo('/search')">
            <i class="iconfont icon-sousuo"></i> 
            <span>搜索</span>
        </a>
      </div>
      <div class="footer_item">
        <!-- <a class="item" :class="isOn===true?'on':''" href=""> -->
        <a class="item" :class="{on:'/order'===$route.path}" href="javascript:;" @click="goTo('/order')">
            <i class="iconfont icon-dingdan"></i> 
            <span>订单</span>
        </a>
      </div>
      <div class="footer_item">
        <!-- <a class="item" :class="isOn===true?'on':''" href=""> -->
        <a class="item" :class="{on:'/profile'===$route.path}" href="javascript:;" @click="goTo('/profile')">
            <i class="iconfont icon-wode"></i> 
            <span>我的</span>
        </a>
      </div>
    </div>
  </div>
</template>

<script>
export default {
   data() {
       return {
        //    isOn:true
       }
   },
    methods: {
        goTo(path){
            this.$router.replace(path)
        }
    },
};
</script>

<style lang="less">
html,
body {
  padding-bottom: 54px;
}
.footer_wrap {
  .footer_content {
    background-color: white;
    overflow: hidden; 
    // z-index: 100;
    display: flex;
    justify-content: space-around;
    align-content: center;
    border-top: 1px solid #e4e4e4;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 100;
    left: 0;
    width: 100%;
    .footer_item {
      a {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-content: center;
        text-align: center;
        margin: 5px;
        color: #999999;
        i {
          font-size: 22px;
          margin-bottom: 5px;
        }
        
      }
      .on {
        color: #02a774;
      }
    }
  }
}
</style>